1. Field of the Invention
The present invention relates to a technique for tracking an object by acquiring a correlation between images.
2. Description of the Related Art
Some digital cameras and video cameras display an image to be captured on a monitor in real time and allow a user to specify a region on the movie displayed on the monitor to control exposure and focus of the object existing in the region.
Other digital cameras and video cameras allow the user to specify an arbitrary object on the movie displayed on the monitor in order to specify a main object as a tracking target to be tracked. Japanese Patent Application Laid-Open No. 2008-011497 discusses a configuration of a camera which continuously tracks an initially-specified main object by calculating correlation between frame images of the movie and continuously detecting a region similar to the initially-specified main object in time series.
However, if the object of the tracking target widely moves, common portions between the frame images decrease even if the frame images include the same object. Thus, the object in the frame image cannot be recognized as the same object, and tracking may fail.
With reference to FIGS. 4A, 4B, and 4C, an example will be described. In FIGS. 4A, 4B, and 4C, rectangular-shaped frames indicated by bold lines are tracking frames indicating the object specified by the user or the region of the main object detected by the tracking processing. The tracking frame is set a bit larger than the specified object so that the object (in this example, a person's face) specified by the user can fit into the frame.
For example, in FIG. 4A, it is supposed that the person's face which is initially specified as the main object is successfully tracked by correlation calculation. If the person abruptly moves, an image of the person is largely blurred as illustrated in FIG. 4B. Since the tracking frame illustrated in FIG. 4A includes a part of background behind the person, in the frame image illustrated in FIG. 4B, the background is determined as the region that has the highest correlation rather than the person. Thus, the background may be selected as a region of a new main object.
If only a region having low correlation is detected, it may be determined that the main object is missed. However, when a posture or a direction of the main object is changed, high correlation between the regions cannot be always acquired, even though the main object exists in the image. Thus, in order to enable tracking of the object even when the object moves or changes its posture to some degree, it is desired that a region having the highest correlation in an image is selected as the region of the main object, even though only the region having the low correlation exists in the image.
However, in this case, a part of the background may be selected as a region of a new main object as illustrated in FIG. 4B. If the background is a uniform object having low contrast, many similar regions exist in the periphery. Therefore, as illustrated in FIG. 4C, the tracking frame moves around the background and looks blurred.